<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var str = "itheima@itacast.cn";

    var reg = /(\w+)[@](\w+)[.](\w+)/;

    console.log(reg.test(str));

    console.log('git@gitee.com:bigramy/test_merge.git')
    var arr = reg.exec(str);

    console.log(arr);
    console.log(arr[1]);
    
    
    
    
    
    
</script>